﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Tour.BLL;
using Tour.DAL;

public partial class Tourist_Controls_Left : VST.Controls.BaseLCGUserControl
{
    public static int PageSize = 6;
    public int PageIndex { get; set; }
    public string TypeTextID { get; set; }
    public int? ParentId { get; set; }
    public bool? IsVisible { get; set; }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            LoadData();
          LoadData1();
          LoadData2();
        }
    }
    void LoadData()
    {
        ParentId = int.Parse(GetLocaleResourceString("Module.Home.TourNoiDiaID"));
        rpt.DataSource = TblTourTypeManager.CreateInstant().SelectTblTourTypeBy(null, ParentId, WorkingLanguage, "", IsVisible, "Id", "DESC");
        rpt.DataBind();
    }
    void LoadData1()
    {
        ParentId = int.Parse(GetLocaleResourceString("Module.Home.TourQuocTeID "));
        rpt1.DataSource = TblTourTypeManager.CreateInstant().SelectTblTourTypeBy(null, ParentId, WorkingLanguage, "", IsVisible, "Id", "DESC");
        rpt1.DataBind();
    }
    void LoadData2()
    {
        int TotalRow = 0;
        rpt2.DataSource = TblTourManager.CreateInstant().tr_SelectTblTourByTourTypeAllChild(null, "tour-noi-dia", null, null, null, null, PageSize, 1, out TotalRow, "CreatedDate", "DESC");
        rpt2.DataBind();
    }
}